package com.test.dataSource.mvc;


import com.test.dataSource.po.Test;
import com.test.dataSource.service.testService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class testController {
    @Autowired
    private testService testService;

    @RequestMapping( "/d0")
    public void selectById(){
        List<Map<String, Object>> allStudents1 = testService.getAllStudents1();
        System.out.println(allStudents1.toString());
    }

    @RequestMapping( "/d1")
    public void selectone(){
        List<Map<String, Object>> allStudents1 = testService.getAllStudents2();
        System.out.println(allStudents1.toString());
    }

    @RequestMapping( "/d2")
    public void selectTwo(){
        List<Map<String, Object>> allStudents1 = testService.getAllStudents3();
        System.out.println(allStudents1.toString());
    }
}
